package
{
	
	import com.reintroducing.events.CustomEvent;
	import flash.display.*;
    import flash.events.*;
	import flash.utils.*;
	import flash.net.*;
	import com.greensock.*;
	import com.greensock.easing.*;
	import com.greensock.plugins.*;
	
	public class Intro extends MovieClip
	{
		
		private var _currentLoader:Loader;
		private var _zoomSpeed:Number = 7;
		private var _zoomDuration:Number;
		private var _newRequest:URLRequest;
		public var photo:*;
		private var _zoomTween:TweenMax;
		private var myX = -600;
		private var myY = -205;
		
		public function Intro():void
		{
			
			trace("Ritz")
			this._zoomDuration = this._zoomSpeed;			
			
			var img1:BitmapData=new s1();
			var _loc_1:* = new Bitmap(img1);
			_loc_1.smoothing = true;
			_loc_1.x = myX;
			_loc_1.y = myY;
			i1_mc.addChild(_loc_1);
			
			var img2:BitmapData=new s2();
			var _loc_2:* = new Bitmap(img2);
			_loc_2.smoothing = true;
			_loc_2.x = myX;
			_loc_2.y = myY;
			i2_mc.addChild(_loc_2);
			
			var img3:BitmapData=new s3();
			var _loc_3:* = new Bitmap(img3);
			_loc_3.smoothing = true;
			_loc_3.x = myX;
			_loc_3.y = myY;
			i3_mc.addChild(_loc_3);
			
			var img4:BitmapData=new s4();
			var _loc_4:* = new Bitmap(img4);
			_loc_4.smoothing = true;
			_loc_4.x = myX;
			_loc_4.y = myY;
			i4_mc.addChild(_loc_4);
			
			var img5:BitmapData=new s5();
			var _loc_5:* = new Bitmap(img5);
			_loc_5.smoothing = true;
			_loc_5.x = myX;
			_loc_5.y = myY;
			i5_mc.addChild(_loc_5);
			
			i1_mc.alpha = 1;
			//this._zoomTween = TweenMax.from(i1_mc, this._zoomDuration, { scaleX:1.2, scaleY:1.2 } );
			TweenMax.to(i2_mc, 0, { delay: this._zoomDuration - 1, onComplete: myFunction } );
			
		}// end function		
		
		
		function myFunction()
		{
			TweenMax.to(i1_mc, 1, {alpha: 0, ease: Sine.easeOut});
			TweenMax.to(i2_mc, 1, {alpha: 1, ease: Sine.easeOut});
			//TweenMax.from(i2_mc, this._zoomDuration, { scaleX:1.2, scaleY:1.2 })
			TweenMax.to(i3_mc, 0, {delay: this._zoomDuration - 1, onComplete: myFunction2});
		}// end function
		
		function myFunction2()
		{
			TweenMax.to(i2_mc, 1, {alpha: 0, ease: Sine.easeOut});
			TweenMax.to(i3_mc, 1, {alpha: 1, ease: Sine.easeOut});
			//TweenMax.from(i3_mc, this._zoomDuration, { scaleX:1.2, scaleY:1.2 })
			TweenMax.to(i4_mc, 0, {delay: this._zoomDuration - 1, onComplete: myFunction3})
		}// end function
		
		function myFunction3()
		{
			TweenMax.to(i3_mc, 1, {alpha: 0, ease: Sine.easeOut});
			TweenMax.to(i4_mc, 1, {alpha: 1, ease: Sine.easeOut});
			//TweenMax.from(i4_mc, this._zoomDuration, { scaleX:1.2, scaleY:1.2 })
			TweenMax.to(i5_mc, 0, {delay: this._zoomDuration - 1, onComplete: myFunction4})
		}// end function
		
		function myFunction4()
		{
			TweenMax.to(i4_mc, 1, {alpha: 0, ease: Sine.easeOut});
			TweenMax.to(i5_mc, 1, {alpha: 1, ease: Sine.easeOut});
			//TweenMax.from(i5_mc, this._zoomDuration, { scaleX:1.2, scaleY:1.2 })
			TweenMax.to(i1_mc, 0, {delay: this._zoomDuration - 1, onComplete: myFunction1})
		}// end function
		
		function myFunction1()
		{
			TweenMax.to(i5_mc, 1, {alpha: 0, ease: Sine.easeOut});
			TweenMax.to(i1_mc, 1, {alpha: 1, ease: Sine.easeOut});
			//TweenMax.from(i1_mc, this._zoomDuration, { scaleX:1.2, scaleY:1.2 })
			TweenMax.to(i2_mc, 0, {delay: this._zoomDuration - 1, onComplete: myFunction})
		}// end function
	
	}
}